package com.gxitsky.controller;

import com.alibaba.fastjson.JSON;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @author gxing
 * @desc TODO
 * @date 2022/5/6
 */
@RestController
public class HelloController {

    @RequestMapping("/hello")
    public String hello() {
        return "Hello" + "World!";
    }

    @RequestMapping("/receive")
    public String hello(@RequestBody HashMap<String, String> map) {
        System.out.println(JSON.toJSON(map));
        return "Hello" + "World!";
    }
}
